//
//  NSObject+NN.m
//  TempletProject
//
//  Created by lina on 15/11/4.
//  Copyright © 2015年 张 坤. All rights reserved.
//

#import "NSObject+NN.h"

@implementation NSObject (NN)
+(BOOL)isNilOrNull:(id)obj{
    BOOL isNull = NO;
    
    if (obj == nil || [obj isKindOfClass:[NSNull class]]) {
        isNull = YES;
    }
    else {
        if ([obj isKindOfClass:[NSString class]] || [obj isKindOfClass:[NSMutableString class]]) {
            if ([[(NSString *)obj stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] == 0) {
                isNull = YES;
            }
        }
    }
    
    return isNull;
}
@end
